<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>设备类型</title>
  <meta name="renderer" content="webkit">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
  #parse('/headFiles.html')
</head>
<body>
<div class="layui-fluid layui-form" wid100>
    <div class="layui-row">
        <div class="layui-col-sm4">
            <div class="layui-form-item">
                <label class="layui-form-label">设备图片</label>
                <div class="layui-input-block">
                    <input type="text" name="thumbnailImg" class="form-control" value="$!{thumbnailImg}">
                </div>
            </div>
        </div>
        <div class="layui-col-sm8">
            #if($id)
            <div class="layui-form-item">
                <label class="layui-form-label">类型ID</label>
                <input type="hidden" name="id" value="$!{id}"/>
                <div class="layui-form-mid layui-word-aux">$!{id}</div>
            </div>
            #else
            <div class="layui-form-item">
                <label class="layui-form-label">类型ID</label>
                <div class="layui-input-block">
                    <input type="text" name="id" lay-verify="required" placeholder="请输入设备类型ID" autocomplete="off" class="layui-input" value="$!{id}">
                </div>
            </div>
            #end
            <div class="layui-form-item">
                <label class="layui-form-label">类型名称</label>
                <div class="layui-input-block">
                    <input type="text" name="name" lay-verify="required" placeholder="请输入设备类型名称" autocomplete="off" class="layui-input" value="$!{name}">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">功率(W)</label>
                <div class="layui-input-block">
                    <input type="text" name="batteryPower" lay-verify="required" placeholder="请输入电池功率" autocomplete="off" class="layui-input" value="$!{batteryPower}">
                </div>
            </div>
        </div>
    </div>
    <div class="layui-card">
        <div class="layui-card-header">设备介绍</div>
        <div class="layui-card-body">
            <input type="text" name="images" class="form-control" value="$!{images}">
        </div>
    </div>
    <div class="layui-form-item layui-hide">
        <input type="button" lay-submit lay-filter="LAY-form-submit" id="LAY-form-submit" value="确认">
    </div>
</div>
#parse('/footFiles.html')
<script>
layui.config({
  base: '$!{webRoot}/layuiadmin/' //静态资源所在路径
  ,webRoot:'$!{webRoot}'
}).extend({
  index: 'lib/index' //主入口模块
}).use(['index', 'form'], function(){
  var $ = layui.$,form = layui.form;

    $('input[name="thumbnailImg"]').jfFileManager({
        resDomain:'${resDomain}',
        token:'$!{resToken}',
        multiple:false,
        path:'/device/images',
        parent:parent
    });

    $('input[name="images"]').jfFileManager({
        resDomain:'${resDomain}',
        token:'$!{resToken}',
        multiple:true,
        path:'/device/images',
        parent:parent
    });
})
</script>
</body>
</html>